/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controlador;

/**
 *
 * @author Invitado
 */
import Dao.DisciplinaJpaController;
import Dao.EspacioDeportivoJpaController;
import Dao.exceptions.NonexistentEntityException;
import Dao.exceptions.PreexistingEntityException;
import Logica.Disciplina;
import Logica.EspacioDeportivo;
import java.util.List;
import java.util.Random;
import javax.persistence.EntityManagerFactory;

public class ControladorDisciplina {
    private EntityManagerFactory factory;
    private ConnectionFactory connection;
    DisciplinaJpaController daoDisciplina;
    
    public ControladorDisciplina()
    {
        connection = ConnectionFactory.getFactory();
        factory = connection.getFactoria();
        this.daoDisciplina = new DisciplinaJpaController(factory);
    }
    
    public List<Disciplina> consultarDisciplinas()
    {
        return this.daoDisciplina.findDisciplinaEntities();
    }
}
